home *** CD-ROM | disk | FTP | other *** search
- /* esc - map string into escaped character if appropriate */
-
- /* copyright (c) 1982 by the Toolsmith */
-
- char esc(s)
- register char **s;
- {
- extern unsigned scnstr();
- static char real[] = "\b\t\v\f\n\r\(\!\)\^";
- static char symb[] = "btvfnr(!)^";
-
- if (**s != '\\')
- return **s;
- if (*(*s+1) == '\0') /* not special at end */
- return('\\');
- ++*s;
- real[sizeof(real)-1] = **s;
-
- return real[scnstr(symb, **s)];
- }
-